Hi Axel,
Starting with Sensu Core (Agent-based) method of integrating with PagerDuty and modifying it a bit, it should possible to integrate Sensu with multiple PagerDuty services by setting up the same integration more than once, with different integration keys, and thus allow you to achieve the desired effect. Under this configuration, scheduling and escalation would still be handled in PagerDuty.
It would work through allowing you to distinguish alerts that should go to one service with support hours (and alert during hours / produce low urgency or no notifications after hours, depending on the agents’ notification settings) from alerts that go to another service that notifies on-call agents at any time. This would be achieved by assigning different Sensu handlers to the appropriate checks.
The way one would do this is to create several differently-named check handlers that call pd-sensu
with a different integration key, so instead of pagerduty
you might have pagerduty_urgent
and pagerduty_supporthours
.
You’d start in step 2 of the guide by making two aptly-named copies of the configuration template, i.e. pagerduty_urgent_handler.json
and pagerduty_supporthours_handler.json
, and in each one of them change the name of the handler.
For instance:
wget -O /etc/sensu/conf.d/pagerduty_supporthours_handler.json https://raw.githubusercontent.com/PagerDuty/pdagent-integrations/master/conf.d/sensu_pagerduty_handler.json
vi /etc/sensu/conf.d/pagrduty_supporthours_handler.json
{
"handlers": {
"pagerduty_supporthours": {
"type": "pipe",
"command": "/usr/share/pdagent-integrations/bin/pd-sensu -k YOUR-INTEGRATION-KEY-HERE"
}
}
}
The final step will be to fill in the handler configurations with the different PagerDuty integration keys.
Please give that a try, and let us know if it works!